﻿package sedie.exchangeddata 
{
	/**
	 * ...
	 * @author Doan Nguyen Thuy Nha Truc (Bamboo)	
	 */
	import flash.events.EventDispatcher;
	import game.constants.ConstData;
	import game.events.EventData;
	public class UserLiveBetPoolInfo extends EventDispatcher
	{
		
		public var cardZeroTotalAmt:int = 0;
		public var cardOneTotalAmt:int = 0;
		public var cardThreeTotalAmt:int = 0;
		public var cardFourTotalAmt:int = 0;
		public var cardOddTotalAmt:int = 0;
		public var cardEvenTotalAmt:int = 0;
		
	
		public function UserLiveBetPoolInfo() 
		{
			
		}
		
		public function returnCurrentBetPool(result:String):void {		
			trace("returnCurrentBetPool:" + result);
			var pos:int = ConstData.POS_LBPUSER_PUBLIC;
			this.cardZeroTotalAmt = parseInt(result.substr(pos, ConstData.LEN_LBPUSER_PUBLIC), 10);
			
			pos += ConstData.LEN_LBPUSER_PUBLIC;
			this.cardOneTotalAmt = parseInt(result.substr(pos, ConstData.LEN_LBPUSER_PUBLIC), 10);
			
			pos += ConstData.LEN_LBPUSER_PUBLIC;
			this.cardThreeTotalAmt = parseInt(result.substr(pos, ConstData.LEN_LBPUSER_PUBLIC), 10);
			
			pos += ConstData.LEN_LBPUSER_PUBLIC;
			this.cardFourTotalAmt =  parseInt(result.substr(pos, ConstData.LEN_LBPUSER_PUBLIC), 10);
			
			pos += ConstData.LEN_LBPUSER_PUBLIC;
			this.cardOddTotalAmt = parseInt(result.substr(pos, ConstData.LEN_LBPUSER_PUBLIC), 10);
			
			pos += ConstData.LEN_LBPUSER_PUBLIC;
			this.cardEvenTotalAmt = parseInt(result.substr(pos, ConstData.LEN_LBPUSER_PUBLIC), 10);
			
			
			dispatchEvent(new EventData(EventData.UPDATE_LIVEBETPOOL_USER_PUBLIC, false));
		}
	}

}